import http from "@/http";
//获取角色列表
export const getRoleListApi = ()=>{
    return http.get({
        url:"/api/user/role"
    })
}
//新增
export const addUserApi = (parm: any) => {
    return http.post({
        url: '/api/user',
        data: parm
    })
}
//列表
export const getListApi = (parm: any) => {
    return http.get({
        url: '/api/user/list',
        params: parm
    })
}
//根据id查询用户
export const getUserByIdApi = (useId: any) => {
    return http.get({
        url: '/api/user/getUser',
        params: { userId: useId }
    })
}

//编辑
export const editUserApi = (parm: any) => {
    return http.put({
        url: '/api/user',
        data: parm
    })
}
//删除
export const deleteUserApi = (userId: any) => {
    return http.delete({
        url: `/api/user/${userId}`
    })
}
